import urllib.request as ur
import urllib.parse as up
import lxml.etree as le
import re


url = 'https://so.csdn.net/so/search/s.do?p={}&q={}&t=&viparticle=&domain=&o=&s=&u=&l=&f='.format(2,'java_')

request = ur.Request(
    url=url,
    headers={
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36'
    }
)

response = ur.urlopen(request).read()
print(response)